package com.yopuo.common.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 读取腾讯云相关配置
 *
 * @author zzh
 */
@Component
@ConfigurationProperties(prefix = "oss.qcloud")
public class OssQcloudConfig
{
    /** 访问域名 */
    private static String domain;

    /** 公钥 */
    private static Long appId;

    /** 私钥Id */
    private static String secretId;

    /** 私钥 */
    private static String secretKey;

    /** 区域 */
    private static String region;

    /** 存储空间名称 */
    private static String bucketName;

    /** 前缀名 */
    private static String prefix;

    public void setDomain(String domain) {
        OssQcloudConfig.domain = domain;
    }

    public void setAppId(Long appId) {
        OssQcloudConfig.appId = appId;
    }

    public void setSecretId(String secretId) {
        OssQcloudConfig.secretId = secretId;
    }

    public void setSecretKey(String secretKey) {
        OssQcloudConfig.secretKey = secretKey;
    }

    public void setRegion(String region) {
        OssQcloudConfig.region = region;
    }

    public void setBucketName(String bucketName) {
        OssQcloudConfig.bucketName = bucketName;
    }

    public void setPrefix(String prefix) {
        OssQcloudConfig.prefix = prefix;
    }

    public static String getDomain() {
        return domain;
    }

    public static Long getAppId() {
        return appId;
    }

    public static String getSecretId() {
        return secretId;
    }

    public static String getSecretKey() {
        return secretKey;
    }

    public static String getRegion() {
        return region;
    }

    public static String getBucketName() {
        return bucketName;
    }

    public static String getPrefix() {
        return prefix;
    }
}
